/**
 * 
 */
package fhq.hcmute.qrcode.detector;

import java.util.ArrayList;

/**
 * @author Hien Nguyen Le
 * @Email: nglehien@gmail.com
 */
public class FinderPatternInfo {
	private final PatternPoint topLeft;
	private final PatternPoint topRight;
	private final PatternPoint bottomLeft;
	public PatternPoint getTopLeft() {
		return topLeft;
	}

	public PatternPoint getTopRight() {
		return topRight;
	}

	public PatternPoint getBottomLeft() {
		return bottomLeft;
	}

	public FinderPatternInfo(PatternPoint topLeft, PatternPoint topRight,
			PatternPoint bottomLeft) {
		this.topLeft = topLeft;
		this.topRight = topRight;
		this.bottomLeft = bottomLeft;
	}

	public FinderPatternInfo(ArrayList<PatternPoint> patternPoints) {
		this.topLeft = patternPoints.get(0);
		this.topRight = patternPoints.get(1);
		this.bottomLeft = patternPoints.get(2);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("TopLeft:" + topLeft.toString() + "\n");
		builder.append("TopRight:" + topRight.toString() + "\n");
		builder.append("BottomLeft:" + bottomLeft.toString() + "\n");
		return builder.toString();
	}
}
